export interface RouteItem {
  menuname: Array<string>;
  asdefault?: boolean; // 默认显示
  path?: string;
  type?: boolean;
  component?: string | (() => any);
  isTabMenu?: boolean;
  tabTitle?: string;
}

export type RoutesConfig = RouteItem[];
const config: RoutesConfig = [
  // 流程-模型管理
  {
    menuname: ['系统设置', '流程管理', '模型管理'],
    asdefault: true,
    path: '/workflow/model',
    component: '../pages/workflow/model/index.tsx',
  },
  // 流程-模型管理-创建
  {
    menuname: ['系统设置', '流程管理', '模型管理'],
    asdefault: true,
    path: '/workflow/model/add',
    component: '../pages/workflow/model/child/created/index.tsx',
    tabTitle: '创建流程模型',
    type: true,
  },
  {
    menuname: ['系统设置', '流程管理', '模型管理'],
    asdefault: true,
    path: '/workflow/model/configure',
    component: '../pages/workflow/model/child/configure/index.tsx',
    tabTitle: '配置流程模型',
    type: true,
  },
  // 流程-流程部署
  {
    menuname: ['系统设置', '流程管理', '流程部署'],
    asdefault: true,
    path: '/workflow/deploy',
    component: '../pages/workflow/deploy/index.tsx',
  },
  // 流程-流程管理
  {
    menuname: ['系统设置', '流程管理', '流程管理'],
    asdefault: true,
    path: '/workflow/manage',
    component: '../pages/workflow/manage/index.tsx',
  },
  // 流程-设置审核人
  {
    menuname: ['系统设置', '流程管理', '流程管理'],
    asdefault: true,
    path: '/workflow/manage/reviewed',
    component: '../pages/workflow/manage/child/index.tsx',
    tabTitle: '设置审核人',
    type: true,
  },
  {
    menuname: ['系统设置', '流程管理', '流程管理'],
    asdefault: true,
    path: '/workflow/manage/reviewed/add',
    component: '../pages/workflow/manage/child/index.tsx',
    tabTitle: '设置审核人',
    type: true,
  },
  // 流程-流程配置
  {
    menuname: ['系统设置', '流程管理', '流程配置'],
    asdefault: true,
    path: '/workflow/configure',
    component: '../pages/workflow/configure/index.tsx',
  },
  // 流程-流程配置-新增
  {
    menuname: ['系统设置', '流程管理', '流程配置'],
    asdefault: true,
    path: '/workflow/configure/add',
    component: '../pages/workflow/configure/child/index.tsx',
    tabTitle: '流程配置新增',
    type: true,
  },
  // 流程-流程配置-编辑
  {
    menuname: ['系统设置', '流程管理', '流程配置'],
    asdefault: true,
    path: '/workflow/configure/edit',
    component: '../pages/workflow/configure/child/index.tsx',
    tabTitle: '流程配置编辑',
    type: true,
  },
  // 流程-流程配置-详情
  {
    menuname: ['系统设置', '流程管理', '流程配置'],
    asdefault: true,
    path: '/workflow/configure/view',
    component: '../pages/workflow/configure/child/index.tsx',
    tabTitle: '流程配置详情',
    type: true,
  },
];

export default config;
